using NUnit.Framework;

namespace TDUnit.Examples
{
    [TestFixture]
    public class ComplexSqlServerTestDataTests : SqlServerTestDataTestsBase
    {

        protected override string GetDataSetNamespace()
        {
            return "http://tdunit.org/TestDataSchema.xsd";
        }

        protected override string GetTestDataFilePath()
        {
            return "OrderTestData.xml";
        }

        [Test]
        public void TestResults()
        {
            Assert.AreEqual(
                dataset.GetTable("Product").GetRow("ProductRow1").GetColumn("ID").Value,
                dataset.GetTable("OrderLine").GetRow("OrderLineRow2").GetColumn("ProductID").Value);

            Assert.AreEqual(
                dataset.GetTable("Order").GetRow("OrderRow").GetColumn("ID").Value,
                dataset.GetTable("OrderLine").GetRow("OrderLineRow1").GetColumn("OrderID").Value);
        }
    }
}